home *** CD-ROM | disk | FTP | other *** search
- Chapter 6
-
- The DOS Resource Programs
-
- The DOS Resource Programs let you manage the data structures used
- by DOS. You may use these programs by themselves, either to
- determine the current memory used or to add resources out of
- conventional memory. Their use with the LOADHI programs will
- benefit you the most.
-
- DOS always allocates memory for each resource. The amount
- allocated varies according to the DOS version. Earlier versions
- of DOS do not have support for some of the resources. Users
- increase the memory for a resource by including a statement in
- their CONFIG.SYS file. DOS reads and processes this file during
- its boot sequence.
-
- This chapter discusses each of the DOS resource allocation
- programs. Each DOS resource is described briefly. Changes or
- additions to your CONFIG.SYS and AUTOEXEC.BAT files are given
- where needed. This information should also help those of you who
- are taking advantage of increasing these DOS resources for the
- first time.
-
- ~Subhead~ Using the DOS Resource Programs
-
- The programs described in this chapter are all used in much the
- same way. Running the program without any parameters gives you a
- report on the current memory allocation for the resource. All
- programs accept a numeric parameter which increases the memory
- available to DOS for that resource. And each allocates this
- additional memory from high RAM when you use LOADHI.
-
- To use high RAM effectively, you change CONFIG.SYS to reduce the
- memory allocation. You then change AUTOEXEC.BAT to increase the
- resource.
-
- The parameters these programs use share a common syntax. A
- number, or a number preceded by an equals sign (nn or =nn), gives
- the total number of data structures needed. A number preceded by
- a plus sign (+nn), adds that many more structures. All the
- programs add memory; you cannot use them to reduce the memory
- allocated to a resource.
-
- ~Subhead~ BUFFERS.COM
-
- The DOS buffers resource can improve disk I/O response times. DOS
- always has some number of disk sector buffers allocated. The
- default number varies, according to the version of DOS, from 2 to
- 15 buffers. You can add more buffers with a statement in your
- CONFIG.SYS file. For example, the statement, BUFFERS=30,
- allocates space for a total of thirty sector buffers. Each sector
- buffer requires 528 bytes of memory.
-
- NOTE: Do not use BUFFERS.COM in DOS 4.0 systems. The structure of
- the disk buffers is different, and BUFFERS.COM does not support
- that format.
-
- Without the services of BUFFERS with LOADHI, buffers are
- allocated out of conventional memory. Adding buffers can improve
- program response time but reduces the memory available to your
- applications. Also, one application may benefit from sector
- buffering while another is unaffected. Much depends upon how they
- access the files they use. Having your disk buffers allocated
- out of high RAM can, therefore, keep the benefits of disk
- buffering and avoid the associated penalty.
-
- You can display a report of the number of buffers now allocated:
-
- ~Step~ Type BUFFERS and press <Enter>.
-
- The program responds by reporting " BUFFERS=30 now".
-
- To load 30 buffers in High RAM:
-
- ~Step~ Type LOADHI BUFFERS +30 and press <Enter>.
-
- The program responds by reporting:
-
- BUFFERS=30 before
- 30 buffers added
- BUFFERS=60 now
-
- If you have a BUFFERS=statement in your CONFIG.SYS file, we
- recommend loading your buffers in high memory. Let's assume for
- our example that you have previously determined that you require
- 40 disk buffers, so the CONFIG.SYS file now contains the
- statement, BUFFERS=40. To load these in high memory:
-
- ~Step~ First change the BUFFERS statement in your CONFIG.SYS
- toBUFFERS=1.
-
- This specifies a small number of buffers to override any default
- DOS allocation. If you simply remove this statement from
- CONFIG.SYS you may end up with as many as fifteen disk buffers
- allocated out of conventional memory.
-
-
- ~Step~ Next change your AUTOEXEC.BAT file so the first statement
- isLOADHI BUFFERS=40 or +39.
-
- NOTE: Make it the first statement so other AUTOEXEC.BAT
- statements can take advantage of disk buffering. You will need to
- specify the directory for LOADHI and BUFFERS if you have not yet
- set your PATH.
-
- ~Subhead~ FILES.COM
-
- DOS uses the files resource to keep track of disk files while
- they are open. The files resource is a data structure requiring
- about 53 bytes for each open file. This data structure is
- closely related to a DOS file handle, so that term is used here.
-
- The default number of file handles DOS allocates is small and
- seldom enough. Many of the larger applications require more. A
- program such as DESQview, which allows multiple programs to be
- running concurrently, requires at least this much. Depending on
- the active applications, DESQview may require even more. It is
- quite likely that you already have a FILES= statement in your
- CONFIG.SYS file. FILES=20 is a common setting.
-
- You can display a report of the number of files now allocated:
-
- ~Step~ Type FILES and press <Enter>.
-
- The program responds by reporting "FILES=20 now".
-
- To add 20 files in high memory:
-
- ~Step~ Type LOADHI FILES +20 and press <Enter>.
-
- The program responds by reporting:
-
- FILES=20 before
- 20 files added
- FILES=40 now
-
- Whether you do or do not currently have a FILES= statement in
- your CONFIG.SYS file, we recommend loading files in high memory.
- Let's assume for our example that you have previously determined
- that you require 30 files, so your CONFIG.SYS file now contains
- the statement, FILES=30. To load FILES in high memory:
-
- ~Step~ Change the FILES statement in your CONFIG.SYS file to
- FILES=10.
-
- This statement allocates 10 file handles. This number puts only a
- small burden on the use of conventional memory, while avoiding
- problems with certain applications.
-
- ~Step~ Add the statement, LOADHI FILES=40 in your AUTOEXEC.BAT
- file.
-
- ~Subhead~ FCBS.COM
-
- DOS uses the FCB resource to keep track of File Control Blocks
- (FCBs). Versions of DOS prior to DOS 2.0 used FCBs exclusively to
- open and manage open disk files. Since DOS 2.0, the preferred
- method of file access involves the use of file handles. Because
- some programs written before DOS 2.0 are still in use, the use of
- FCBs is still supported.
-
- Skip this section if you are not using SHARE and do not have an
- FCBS statement in your CONFIG.SYS file. Also, this resource is
- not available in DOS version 2 systems.
-
- The FCB management by DOS involves two numbers. The first number
- instructs DOS to allocate memory for that many FCBs. The second
- number indicates how many of those FCBs should be protected when
- DOS needs to close an open FCB. Each FCB resource allocated
- requires about 53 bytes.
-
- NOTE: The FCB resource uses contiguous memory. When you add FCBs,
- a new block of memory for the entire table must be allocated. The
- memory used by the original table is not recovered.
-
- You can display a report of the number of files now allocated:
-
- ~Step~ Type FCBS and press <Enter>.
-
- The program responds by reporting "FCBS=4,0 now".
-
- To add to add 4 more FCBs, with 2 additional FCBs protected.
-
- ~Step~ Type LOADHI FCBS +4,2 and press <Enter>.
-
- The program responds by reporting:
-
- FCBS=4,0 before
- 4 FCBs added
- 2 protected FCBs added
- FCBs=8,2 now
-
- If you currently have a FCBs= statement in your CONFIG.SYS file,
- we recommend loading FCBs in high memory. Let's assume for our
- example that you have previously determined that you require 8,2
- FCBs, so your CONFIG.SYS file now contains the statement,
- FCBS=8,2. To load FCBs in high memory:
-
- ~Step~ Remove the FCBS= statement in your CONFIG.SYS.
-
- ~Step~ Add the statement, LOADHI FCBS 8,2, to your AUTOEXEC.BAT
- file.
-
- ~Subhead~ LASTDRIV.COM
-
- DOS uses the last drive resource to support both physical and
- logical disk drives. Logical disk drives are useful if you use
- the DOS SUBST program. Each drive entry in DOS's drive table
- requires about 80 bytes.
-
- You can add drive table support using the numerical parameters
- you have seen throughout this section or you can set it using a
- drive letter.
-
- NOTE: The DOS drive table uses contiguous memory. When you add
- more drives, a new block of memory for the entire table must be
- allocated. The memory used for the original drive table is not
- recovered.
-
- You can display a report of the number of files now allocated:
-
- ~Step~ Type LASTDRIVE and press <Enter>.
-
- The program responds by reporting:
-
- LASTDRIVE=E now
-
- To load a new drive table in high RAM:
-
- ~Step~ Type LOADHI LASTDRIV G and press <Enter>.
-
- The program responds by reporting:
-
- LASTDRIVE=E before
- 2 drives added
- LASTDRIVE=G now
-
- We recommend that you change your LASTDRIVE= statement in
- CONFIG.SYS so only your actual disk volumes are specified (For
- example, LASTDRIVE=D). If your hard disk is partitioned, the
- drive letter should correspond to the last partition. This
- minimizes the "lost" memory. Then load logical drives in high
- memory. For example to add three logical drives:
-
- ~Step~ Add the statement, LOADHI LASTDRIV +3, to your
- AUTOEXEC.BAT file.
-